package com.smartEdu.controller.web;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.context.ContextLoader;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.servlet.support.RequestContextUtils;

@Controller
@RequestMapping(value="logins")
public class WebLogin extends WebBaseController{

	@RequestMapping(value="weblogin")
	public String login(HttpServletRequest request,HttpServletResponse response) throws Exception{
		Map<String,Object> session = new HashMap<String,Object>();
		String sessionID=request.getSession().getId();
		/*WebApplicationContext applicationContext = RequestContextUtils.getWebApplicationContext(request);
		WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext();  
        ServletContext servletContext = webApplicationContext.getServletContext();*/
		System.out.println("sessionID:"+sessionID);
		session.put("sessionID", sessionID);
		return "/login/loginroom";
	}

}
